﻿//-----------------------------------------------------------------------
// <copyright file="ITrigger.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings
using System.Security.Principal;
#endregion

namespace FastNET.CleanAct.Client.Interfaces.Triggers
{
    /// <summary>
    /// Basic interface for a trigger
    /// </summary>
    public interface ITrigger
    {
        /// <summary>
        /// Called when a user logs onto the system
        /// </summary>
        /// <param name="user">WindowsIdentity of the user the event that occured</param>
        void SessionLogon(WindowsIdentity user);

        /// <summary>
        /// Called when a user logs out of the system
        /// </summary>
        /// <param name="user">WindowsIdentity of the user the event that occured</param>
        void SessionLogoff(WindowsIdentity user);

        /// <summary>
        /// Called when a session is locked
        /// </summary>
        /// <param name="user">WindowsIdentity of the user the event that occured</param>
        void SessionLocked(WindowsIdentity user);

        /// <summary>
        /// Called when a session is unlocked
        /// </summary>
        /// <param name="user">WindowsIdentity of the user the event that occured</param>
        void SessionUnlocked(WindowsIdentity user);

        /// <summary>
        /// Called when the application starts
        /// </summary>
        void ApplicationStart();

        /// <summary>
        /// Called when the application stops
        /// </summary>
        void ApplicationStop();

        /// <summary>
        /// Called before the execution of the engine starts
        /// </summary>
        void EngineBeforeExecute();

        /// <summary>
        /// Called after the execution of the engine finishes
        /// </summary>
        void EngineAfterExecute();
    }
}
